home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / u_man / cat3 / Tk / getfontstr.z / getfontstr
Encoding:
Text File  |  1998-10-30  |  6.1 KB  |  133 lines

  1.  
  2.  
  3.  
  4. TTTTkkkk____GGGGeeeettttFFFFoooonnnnttttSSSSttttrrrruuuucccctttt((((3333TTTTkkkk))))                                    TTTTkkkk____GGGGeeeettttFFFFoooonnnnttttSSSSttttrrrruuuucccctttt((((3333TTTTkkkk))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      Tk_GetFontStruct, Tk_NameOfFontStruct, Tk_FreeFontStruct - maintain
  10.      database of fonts
  11.  
  12. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.      ####iiiinnnncccclllluuuuddddeeee <<<<ttttkkkk....hhhh>>>>
  14.  
  15.      XFontStruct *
  16.      TTTTkkkk____GGGGeeeettttFFFFoooonnnnttttSSSSttttrrrruuuucccctttt((((_i_n_t_e_r_p, _t_k_w_i_n, _n_a_m_e_I_d))))
  17.  
  18.      char *
  19.      TTTTkkkk____NNNNaaaammmmeeeeOOOOffffFFFFoooonnnnttttSSSSttttrrrruuuucccctttt((((_f_o_n_t_S_t_r_u_c_t_P_t_r))))
  20.  
  21.      TTTTkkkk____FFFFrrrreeeeeeeeFFFFoooonnnnttttSSSSttttrrrruuuucccctttt((((_f_o_n_t_S_t_r_u_c_t_P_t_r))))
  22.  
  23. AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  24.      Tcl_Interp    *_i_n_t_e_r_p          (in)      Interpreter to use for error
  25.                                               reporting.
  26.  
  27.      Tk_Window     _t_k_w_i_n            (in)      Token for window in which font
  28.                                               will be used.
  29.  
  30.      Tk_Uid        _n_a_m_e_I_d           (in)      Name of desired font.
  31.  
  32.      XFontStruct   *_f_o_n_t_S_t_r_u_c_t_P_t_r   (in)      Font structure to return name
  33.                                               for or delete.
  34.  
  35.  
  36. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  37.      TTTTkkkk____GGGGeeeettttFFFFoooonnnntttt loads the font indicated by _n_a_m_e_I_d and returns a pointer to
  38.      information about the font.  The pointer returned by TTTTkkkk____GGGGeeeettttFFFFoooonnnntttt will
  39.      remain valid until TTTTkkkk____FFFFrrrreeeeeeeeFFFFoooonnnntttt is called to release it.  _N_a_m_e_I_d can be
  40.      either a font name or pattern;  any value that could be passed to
  41.      XXXXLLLLooooaaaaddddQQQQuuuueeeerrrryyyyFFFFoooonnnntttt may be passed to TTTTkkkk____GGGGeeeettttFFFFoooonnnntttt.  If TTTTkkkk____GGGGeeeettttFFFFoooonnnntttt is
  42.      unsuccessful (because, for example, there is no font corresponding to
  43.      _n_a_m_e_I_d) then it returns NNNNUUUULLLLLLLL and stores an error message in _i_n_t_e_r_p-
  44.      >_r_e_s_u_l_t.
  45.  
  46.      TTTTkkkk____GGGGeeeettttFFFFoooonnnntttt maintains a database of all fonts it has allocated.  If the
  47.      same _n_a_m_e_I_d is requested multiple times (e.g. by different windows or for
  48.      different purposes), then additional calls for the same _n_a_m_e_I_d will be
  49.      handled very quickly, without involving the X server.  For this reason,
  50.      it is generally better to use TTTTkkkk____GGGGeeeettttFFFFoooonnnntttt in place of X library procedures
  51.      like XXXXLLLLooooaaaaddddQQQQuuuueeeerrrryyyyFFFFoooonnnntttt.
  52.  
  53.      The procedure TTTTkkkk____NNNNaaaammmmeeeeOOOOffffFFFFoooonnnnttttSSSSttttrrrruuuucccctttt is roughly the inverse of
  54.      TTTTkkkk____GGGGeeeettttFFFFoooonnnnttttSSSSttttrrrruuuucccctttt.  If its _f_o_n_t_S_t_r_u_c_t_P_t_r argument was created by
  55.      TTTTkkkk____GGGGeeeettttFFFFoooonnnnttttSSSSttttrrrruuuucccctttt, then the return value is the _n_a_m_e_I_d argument that was
  56.      passed to TTTTkkkk____GGGGeeeettttFFFFoooonnnnttttSSSSttttrrrruuuucccctttt to create the font.  If _f_o_n_t_S_t_r_u_c_t_P_t_r was not
  57.      created by a call to TTTTkkkk____GGGGeeeettttFFFFoooonnnnttttSSSSttttrrrruuuucccctttt, then the return value is a
  58.      hexadecimal string giving the X identifier for the associated font.
  59.      Note:  the string returned by TTTTkkkk____NNNNaaaammmmeeeeOOOOffffFFFFoooonnnnttttSSSSttttrrrruuuucccctttt is only guaranteed to
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. TTTTkkkk____GGGGeeeettttFFFFoooonnnnttttSSSSttttrrrruuuucccctttt((((3333TTTTkkkk))))                                    TTTTkkkk____GGGGeeeettttFFFFoooonnnnttttSSSSttttrrrruuuucccctttt((((3333TTTTkkkk))))
  71.  
  72.  
  73.  
  74.      persist until the next call to TTTTkkkk____NNNNaaaammmmeeeeOOOOffffFFFFoooonnnnttttSSSSttttrrrruuuucccctttt.
  75.  
  76.      When a font returned by TTTTkkkk____GGGGeeeettttFFFFoooonnnntttt is no longer needed, TTTTkkkk____FFFFrrrreeeeeeeeFFFFoooonnnntttt
  77.      should be called to release it.  There should be exactly one call to
  78.      TTTTkkkk____FFFFrrrreeeeeeeeFFFFoooonnnntttt for each call to TTTTkkkk____GGGGeeeettttFFFFoooonnnntttt.  When a font is no longer in use
  79.      anywhere (i.e. it has been freed as many times as it has been gotten)
  80.      TTTTkkkk____FFFFrrrreeeeeeeeFFFFoooonnnntttt will release it to the X server and delete it from the
  81.      database.
  82.  
  83.  
  84. KKKKEEEEYYYYWWWWOOOORRRRDDDDSSSS
  85.      font
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.